<?php



header('Content-Type: text/html; charset=utf-8');
try {
    if (isset($_GET['x']) && isset($_GET['y'])) {
        $x = $_GET['x'];
        $y = $_GET['y'];
        $data = "http://172.16.195.26/ArcGIS/rest/services/WLMA/MapServer/identify?geometryType=esriGeometryPoint&geometry=$x,$y&sr=102100&layers=all%3A0&tolerance=1&mapExtent=+608878.538097168+%2C+1503347.9492344+%2C+688081.855102832+%2C+1565063.3543656&imageDisplay=400%2C300%2C96&returnGeometry=false&f=json";
        $json = file_get_contents($data);
        echo $json;
    } else {
        $array = array(
            "Noresult" => "400"
        );
        echo json_encode($array);
    }
} catch (Exception $exc) {
    echo $exc->getTraceAsString();
}
